extends State
class_name Playerdash
@onready var player_sprite: AnimatedSprite2D = $"../../PlayerSprite"

@export var dash_time:float = 1.0
@export var dash_speed = 1000.0

func enter():
	#var direction = 0
	#dash_time = 1.0
	#if !player_sprite.flip_h:
		#direction = 1
	#else:
		#direction = -1
	#character.velocity.x = dash_speed * direction
	#character.velocity.y = 0
	#Autoload.dashflag = false
	pass
	
func update(delta):
	#Autoload.wolf_time -= delta
	#if is_zero_approx(dash_time):
		#dash_time = 0
		#character.velocity.x = 0
		#if !character.is_on_floor():
			#transition_requested.emit("Playerjump")
		#else:
			#transition_requested.emit("Playerwalk")
	#if character.is_on_wall():
		#dash_time = 0
		#character.velocity.x = 0
		#transition_requested.emit("Playerwallslide")
		pass
		
func physics_update(delta):
	#if dash_time > 0:
		#dash_time -= delta*6
	#else:
		#character.velocity.x = move_toward(character.velocity.x,0,dash_speed)
	#character.move_and_slide()
	pass
	
	
